/*  如果箭头函数的返回值是对象,用（）括起来 */


const sum = (a, b) => {
  return {
    a,
    b,
    sum: a + b
  }
}

console.log(sum(1, 2));



/* 简写   对象要用（）包裹*/
const sum1 = (a, b) => ({
  a,
  b,
  sum: a + b
})

console.log(sum1(3, 4));



